package com.yonyou.pmclouds.workConnect.entity;

import com.yonyou.pmclouds.basecom.entity.SuperVO;
import lombok.Data;

import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable;
import java.util.Date;


/**
 * 工作联系子表-接收人信息
 *
 * @author 唐焕
 * @date 2017.8.17
 */
@Data
@Table(name = "pm_workconnect_receiver")
public class WorkConReceiverVO extends SuperVO implements Serializable {
    public static final String PK_WORK_CON_RECEIVER = "pkWorkConReceiver";
    public static final String PK_RECEIVER = "pkReceiver";
    public static final String RECEIVER_NAME = "receiverName";
    public static final String SUGGESTION = "suggestion";
    public static final String RECEIVED_TIME = "receivedTime";
    public static final String RECEIVE_STATUS = "receiveStatus";
    public static final String PK_WORK_CONNECT = "pkWorkconnect";
    // 接收状态
    public static final byte RECEIVE_STATUS_UNACCEPT = 1;
    public static final byte RECEIVE_STATUS_ACCEPTED = 2;

    /**
     * 主键
     */
    @Id
    private String pkWorkConReceiver;
    /**
     * 接收人
     */
    private String pkReceiver;
    /**
     * 接收意见
     */
    private String suggestion;
    /**
     * 接收时间
     */
    private Date receivedTime;
    /**
     * 接收状态，1：未接收，2：已接收
     */
    private byte receiveStatus;
    /**
     * 工作联系(关联主VO)
     */
    private String pkWorkconnect;
    /**
     * 创建人
     */
    private String creator;
    /**
     * 创建时间
     */
    private Date creationtime;
    /**
     * 接收人名字
     */
    @Transient
    private String receiverName;
    @Transient
    private String strReceiveStatus;
    @Transient
    private String pk_workconnect;
    @Transient
    private String strReceivedTime;

    @Override
    public String toString() {
        return "WorkConReceiverVO{" +
                "pkWorkConReceiver='" + pkWorkConReceiver + '\'' +
                ", pkReceiver='" + pkReceiver + '\'' +
                ", suggestion='" + suggestion + '\'' +
                ", receivedTime=" + receivedTime +
                ", receiveStatus=" + receiveStatus +
                ", pkWorkconnect='" + pkWorkconnect + '\'' +
                '}';
    }

    public String taskReceiverField() {
        return PK_RECEIVER;
    }

    public String billStatusField() {
        return RECEIVE_STATUS;
    }
}
